package com.koala.learn.threadlearn.charter4;

import lombok.SneakyThrows;

/**
 * @Description TODO
 * @Date 2022/2/27 20:05
 * @Created by koala
 */

public class Start2 {
    @SneakyThrows
    public static void main(String[] args) {
        Thread thread = new Thread(() -> {
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.println("thread init");
        });
        thread.start();
        thread.join();
        System.out.println("main end");
    }
}
